class Config(object):
    """通用配置"""
    #  数据库配置
    SQLALCHEMY_DATABASE_URI = "mysql://root:mysql@localhost/new_information"
    SQLALCHEMY_TRACK_MODIFICATIONS = False
    SQLALCHEMY_COMMIT_ON_TEARDOWN = True
    # 配置redis数据库
    host_redis = "127.0.0.1"
    port_redis = "6379"
    # CSRF密钥设置
    SECRET_KEY = "oIRz4UxjN4iH43YIe3i250twCE1EYnDeTDmIJl9++94="
    # Session参数配置
    SESSION_TYPE = "redis"
    SESSION_USE_SIGNER = True
    SESSION_PERMANENT = 86400*7


class DevelopmentConfig(Config):
    """开发配置"""
    DEBUG = True
    LOG_LEVEL = "DEBUG"


class ProdectionConfig(Config):
    """生产配置"""
    DEBUG = False
    LOG_LEVEL = "WARNING"